{% for message in message_list %}
    <li class="list_item{% if forloop.first %} list_item_first{% endif %}">
        <div class="author">
            <a href="/profile/{{ message.sender.id }}/">
                <img class="userpic"
                        {% if message.sender.user_info.avatar %}
                     src="{{ message.sender.user_info.avatar.url }}"
                        {% if message.sender.user_info.avatar.width > message.sender.user_info.avatar.height %}
                     width="44"
                        {% else %}
                     height="49"
                        {% endif %}
                        {% else %}
                     src="/media/images/nophoto.jpg/" width="44" height="49"   {% endif %}
                        />
            </a>
        </div>
        <div class="date">{{ message.sent_at|date:"DATETIME_FORMAT" }}</div>
        <div class="text">{{ message.body|linebreaksbr }}</div>

        <!--
        <ul class="options">
            <li class="item"><a href="#">Ответить</a></li>
            <li class="item"><a href="#">Удалить</a></li>
        </ul>
        -->

    </li>
{% endfor %}